﻿
using System.ServiceModel;
using Stimulus360.Models.Cms;
using Stimulus360.Models.Data;
using System.ServiceModel.Web;
using System.Collections.Generic;


namespace Stimulus360.Services.Interfaces
{
    [ServiceContract]
   public  interface IProjectService
    {

        /// <summary>
        ///     Method to get all New Projects 
        /// </summary>
        /// <returns>
        ///     A List of all New Projects
        /// </returns>
        IEnumerable<Project> GetNew();

        /// <summary>
        ///    Method used for RSS Feeds to get list of most popular projects.
        /// </summary>
        /// <returns>
        ///     List of Most popular Projects.
        /// </returns>
        /// <remarks>
        ///     All parameters have been taken in string format to enable REST calls in the future
        /// </remarks>
        IEnumerable<Project> GetTopN(string topN);

        /// <summary>
        ///     Method to get all New Projects   
        /// </summary>
        /// <returns>
        ///     A List of all New Projects
        /// </returns>
        /// <remarks>
        ///     All parameters have been taken in string format to enable REST calls in the future
        /// </remarks>
        PaginatedCollection<Project> GetNew(string pageNo, string pageSize);

        /// <summary>
        ///     Method to get a list of projects in the given category
        /// </summary>
        /// <param name="category">
        ///     The category title for the given category
        /// </param>
        /// <param name="pageNo">
        ///     The Page number being displayed on the screen.
        /// </param>
        /// <param name="pageSize">
        ///     The number of projects being shown in the screen.
        /// </param>
        /// <returns>
        ///     A Paginated List of  Projects for the given category 
        ///     based on the page number and pagesize
        /// </returns>   
        /// <remarks>
        ///     All parameters have been taken in string format to enable REST calls in the future
        /// </remarks>
        PaginatedCollection<Project> FindInCategory(string category, string pageNo, string pageSize);

        /// <summary>
        ///     Method to find Projects based on the given search criteria.
        /// </summary>
        /// <param name="searchCriteria">
        ///     String representing the type of search criteria: ByStatus,ByDate,ByRanking
        /// </param>
        /// <param name="query">
        ///     Search string to be deciphered based on the search criteria.
        /// </param>
        /// <param name="pageNo">
        ///     The Page number being displayed on the screen.
        /// </param>
        /// <param name="pageSize">
        ///     The number of projects being shown in the screen.
        /// </param>
        /// <returns>
        ///     A Paginated List of  Projects for the givens earch criteria
        ///     based on the page number and pagesize
        /// </returns>   
        /// <remarks>
        ///     All parameters have been taken in string format to enable REST calls in the future
        /// </remarks>
        PaginatedCollection<Project> Search(string searchCriteria, string query, string pageNo, string pageSize);

        /// <summary>
        ///     Method to get Project details based on project Id
        /// </summary>
        /// <param name="projectId">
        ///     The project Id for which Project object is to be retrieved
        /// </param>
        /// <returns>
        ///     Project object for the given ProjectId
        /// </returns>
        /// <remarks>
        ///     All parameters have been taken in string format to enable REST calls in the future
        /// </remarks>
        Project FindById(string projectId);

        /// <summary>
        ///     Method to get a list of feedback for the given project.
        /// </summary>
        /// <param name="projectId">
        ///     ProjectID for the Project for which the feedback is to be retrieved
        /// </param>
        /// <param name="pageNo">
        ///     The Page number being displayed on the screen.
        /// </param>
        /// <param name="pageSize">
        ///     The number of feedbacks being shown in the screen.
        /// </param>
        /// <returns>
        ///     A Paginated List of feedback based on the page number and pagesize
        /// </returns>
        /// <remarks>
        ///     All parameters have been taken in string format to enable REST calls in the future
        /// </remarks>
        PaginatedCollection<ProjectRating> GetFeedback(string projectId, string pageNo, string pageSize);

        /// <summary>
        ///     This method is used to get the User's feedback for a specific Project
        /// </summary>
        /// <param name="projectId">
        ///     ProjectID for which feedback is to be retrieved.
        /// </param>
        /// <param name="userName">
        ///     User whose feedback is to be retrieved
        /// </param>
        /// <returns>
        ///     User Feedback for the given project.
        /// </returns>
        /// <remarks>
        ///     All parameters have been taken in string format to enable REST calls in the future
        /// </remarks>
        ProjectRating GetFeedback(string userName, string projectId);

        /// <summary>
        ///     Method to add feedback for a given Project
        /// </summary>
        /// <param name="feedback">
        ///     The feedback to be added
        /// </param>
        /// <remarks>
        ///     Input parameter type will need to change if method is exposed as REST.
        ///     also User Authentication will need to be implemented
        /// </remarks>
        void AddFeedback(ProjectRating feedback);

        /// <remarks>
        ///     All parameters have been taken in string format to enable REST calls in the future
        /// </remarks>
        PaginatedCollection<ProjectDocument> GetDocuments(string projectId, string pageNo, string pageSize);
        
        /// <summary>
        ///     Method to add a document to the given project
        /// </summary>
        /// <param name="document">
        ///     The document to be added
        /// </param>
        /// <remarks>
        ///     Input parameter type will need to change if method is exposed as REST.
        ///     also User Authentication will need to be implemented
        /// </remarks>
        void AddDocument(ProjectDocument document);


        /// <summary>
        ///     Method to retrieve photos for a given project
        /// </summary>
        /// <param name="projectId">
        ///     Project for which photos are to be retrieved
        /// </param>
        /// <param name="pageNo">
        ///     Page number to be displayed
        /// </param>
        /// <param name="pageSize">
        ///     The number of photos to be displayed
        /// </param>
        /// <returns>
        ///     Photos for the given project
        /// </returns>
        /// <remarks>
        ///     All parameters have been taken in string format to enable REST calls in the future
        /// </remarks>
        PaginatedCollection<ProjectPhoto> GetPhotos(string projectId, string pageNo, string pageSize);

        /// <summary>
        ///     Method to add a photo to the project details
        /// </summary>
        /// <param name="photo">
        ///     The photo to be added
        /// </param>
        /// <remarks>
        ///     Input parameter type will need to change if method is exposed as REST.
        ///     also User Authentication will need to be implemented
        /// </remarks>
        void AddPhoto(ProjectPhoto photo);

        /// <summary>
        ///     Method to retrieve a paginated list of volunteers for the given project
        /// </summary>
        /// <param name="projectId">
        ///     Project ID for which list of volunteers is to be retrieved
        /// </param>
        /// <param name="pageNo">
        ///     The page number being viewed
        /// </param>
        /// <param name="pageSize">
        ///     The number of volunteers displayed per page.
        /// </param>
        /// <returns>
        ///     List of volunteers for the given project
        /// </returns>
        /// <remarks>
        ///     All parameters have been taken in string format to enable REST calls in the future
        /// </remarks>
        PaginatedCollection<Volunteer> GetVolunteers(string projectId, string pageNo, string pageSize);

        /// <summary>
        ///     Method to add a volunteer to a project
        /// </summary>
        /// <param name="volunteer">
        ///     Volunteer to be added
        /// </param>
        /// <param name="projectId">
        ///     Project in which the volunteer is interested.
        /// </param>
        /// <remarks>
        ///     Input parameter type will need to change if method is exposed as REST.
        ///     also User Authentication will need to be implemented
        /// </remarks>
        void AddVolunteer(Volunteer volunteer, int projectId);

        /// <summary>
        ///     Method to get list of projects related to the given project
        /// </summary>
        /// <param name="projectId">
        ///     ProjectID for which related list is to be retrieved
        /// </param>
        /// <returns>
        ///     List of related projects.
        /// </returns>
        /// <remarks>
        ///     All parameters have been taken in string format to enable REST calls in the future
        /// </remarks>
        ICollection<Project> GetRelated(string projectId);

        /// <summary>
        ///     Method to retrieve a photo by its ID
        /// </summary>
        /// <param name="photoId">
        ///     The Photo ID to be retrieved
        /// </param>
        /// <returns>
        ///     The Photo for the given ID
        /// </returns>
        /// <remarks>
        ///     All parameters have been taken in string format to enable REST calls in the future
        /// </remarks>
        ProjectPhoto FindPhotoById(string photoId);

        /// <summary>
        ///     Method to retrieve a document based on its ID
        /// </summary>
        /// <param name="documentId">
        ///     ID for which document is to be retrieved
        /// </param>
        /// <returns>
        ///     Document  based on the given ID.
        /// </returns>
        /// <remarks>
        ///     All parameters have been taken in string format to enable REST calls in the future
        /// </remarks>
        ProjectDocument FindDocumentById(string documentId);

        /// <summary>
        ///     This method is used to create a new project.
        /// </summary>
        /// <param name="project">
        ///     The project to be created.
        /// </param>
        /// <remarks>
        ///     Input parameter type will need to change if method is exposed as REST.
        ///     also User Authentication will need to be implemented
        /// </remarks>
        int Add(Project project);
    }
}
